#简单列表排序很简单
ages=[18,19,17]
print(ages)
ages.sort()
print(ages)

#当列表内包含的是字典，怎么根据字典内的age排序呢？
infors=[
    {"name":"mark","age":18},
    {"name":"sq","age":19},
    {"name":"xman","age":17}
]
print(infors)
'''
下面匿名函数等效于：
     def  fun(x):
         return x["age"]
'''
infors.sort(key=lambda x:x["age"])
print(infors)
